<div class="contBlock contBlockFC">
<div class="contBlockHeading"><span class="t">{$CONTENT.form.subject}</span></div>
<div class="contBlockContent">

<div class="contBlockItem">
<form name="dform" method="post" onsubmit="return false;">
<input type="hidden" name="form" value="dform">
<input type="hidden" name="id" value="{$CONTENT.form.id}">

<p>{$CONTENT.form.content|text|nl2br}</p>
<table width="100%" border="0" cellspacing="0" cellpadding="5" class="editBox">
{section name=item loop=$CONTENT.form.items}
  <tr>
    <td width="100" align="right"><label class="fb">{$CONTENT.form.items[item].name}</label>: </td>
    <td>
{if $CONTENT.form.items[item].type == 'text'}
<input type="text" name="field_fi{$CONTENT.form.items[item].id}" value="" {if $CONTENT.form.items[item].require == 1} require="true"{/if}>
{if $CONTENT.form.items[item].require == 1}<span class="require">*</span>{/if}

{elseif $CONTENT.form.items[item].type == 'email'}
<input type="text" name="field_fi{$CONTENT.form.items[item].id}" value="" {if $CONTENT.form.items[item].require == 1} require="true"{/if} valid="email">
{if $CONTENT.form.items[item].require == 1}<span class="require">*</span>{/if}

{elseif $CONTENT.form.items[item].type == 'password'}
<input type="password" name="field_fi{$CONTENT.form.items[item].id}" value="" {if $CONTENT.form.items[item].require == 1} require="true"{/if}>
{if $CONTENT.form.items[item].require == 1}<span class="require">*</span>{/if}

{elseif $CONTENT.form.items[item].type == 'textarea'}
<textarea name="field_fi{$CONTENT.form.items[item].id}" {if $CONTENT.form.items[item].require == 1} require="true"{/if}></textarea>
{if $CONTENT.form.items[item].require == 1}<span class="require">*</span>{/if}

{elseif $CONTENT.form.items[item].type == 'file'}

{elseif $CONTENT.form.items[item].type == 'image'}

{elseif $CONTENT.form.items[item].type == 'select'}
<select name="field_fi{$CONTENT.form.items[item].id}[]" {if $CONTENT.form.items[item].require == 1} require="true"{/if}>
{section name=a loop=$CONTENT.form.items[item].value}
<option value="{$CONTENT.form.items[item].value[a]}">{$CONTENT.form.items[item].value[a]}</option>
{/section}
</select>

{elseif $CONTENT.form.items[item].type == 'checkbox'}
{section name=a loop=$CONTENT.form.items[item].value}
<label><input type="checkbox" name="field_fi{$CONTENT.form.items[item].id}[]" value="{$CONTENT.form.items[item].value[a]}" {if $CONTENT.form.items[item].require == 1} require="true"{/if}>{$CONTENT.form.items[item].value[a]}</label>
{/section}
</select>

{elseif $CONTENT.form.items[item].type == 'radio'}
{section name=a loop=$CONTENT.form.items[item].value}
<label><input type="radio" name="field_fi{$CONTENT.form.items[item].id}" value="{$CONTENT.form.items[item].value[a]}" {if $CONTENT.form.items[item].require == 1} require="true"{/if}>{$CONTENT.form.items[item].value[a]}</label>
{/section}

{else}

{/if}
<p class="desc">{$CONTENT.form.items[item].description|text|nl2br}</p>
    </td>
  </tr>
{sectionelse}
  <tr>
    <td colspan="8"></td>
  </tr>
{/section}
{if $CONTENT.form.captcha == '1'}
  <tr>
    <td width="100" align="right"><label class="fb">Captcha</label>: </td>
    <td><img src="{$CONTEXT.URL}check/code" width="120" height="40" title="Captcha" id="dimg_captcha">&nbsp;
    <a href="javascript:void(0);" onclick="_captcha_refresh()">Refresh</a>
    <p class="desc">Write the characters in the image above</p>
    <input type="text" name="checkcode" value="" size="5" maxlength="4" require="true"></td>
  </tr>
{/if}
  <tr>
    <td></td>
    <td><input type="submit" name="submitbtn" value="Submit" onclick="if(PJS.validator.checkFormValid(this.form)==false)return false;pjs_ws.postForm(this.form,'postform');return false;"></td>
  </tr>
</table>
</form>
</div>

{literal}
<script type="text/javascript" language="javascript">
function _captcha_refresh(){
$E('dimg_captcha').src=PJS.BASE_URL+"check/code"+"/"+PJS.rand("t");
}
</script>
{/literal}

</div>
</div>